﻿using System.Collections.Generic;
using Eflong.DTO.Wcf;

namespace Eflong.MonitorServer
{
    public class BaseMonitorServer : IMonitorServer
    {
        public BaseMonitorServer( ) { }

        public void Dispose( ) { }

        public void Init( ) { }

        public void Start( ) { }

        public void Stop( ) { }

        public int CoalMineCount { get; set; }

        public int CoalMineBreakCount { get; set; }

        public int InterlockedBreakerCount { get; set; }

        public int EarlyWorningCount { get; set; }

        /// <summary>
        /// 联网矿数据改变事件处理函数
        /// </summary>
        public ServerChangedHander onCoalMineCountChanged { get; set; }

        /// <summary>
        /// 联网矿信息改变事件处理函数
        /// </summary>
        public DelegateListViewItemsChanged onCoalMineInfoChanged { get; set; }

        /// <summary>
        /// 组合报警发生改变
        /// </summary>
        public DelegateListViewItemsChanged onInterlockedBreakersChanged { get; set; }

        /// <summary>
        /// 预警情况改变
        /// </summary>
        public DelegateListViewItemsChanged onEarlyWarningsChanged { get; set; }

        /// <summary>
        /// 当前报警及故障情况改变
        /// </summary>
        public DelegateListViewItemsChanged onCurrentAlertChanged { get; set; }

        /// <summary>
        /// 当前报警及故障情况改变
        /// </summary>
        public DelegateListViewItemsChanged onCurrentFaultChanged { get; set; }

        /// <summary>
        /// 当前中断的联网矿集合
        /// </summary>
        public List<CoalMineInfo> list_CoalMineBreakInfo { get; set; }

        /// <summary>
        /// 当前报警的传感器集合
        /// </summary>
        public List<SensorAlert> list_SensorAlert { get; set; }

        /// <summary>
        /// 当前故障的传感器集合
        /// </summary>
        public List<SensorFault> list_SensorFault { get; set; }

        /// <summary>
        /// 当前组合报警集合
        /// </summary>
        public List<InterlockedBreaker> list_InterlockedBreaker { get; set; }

        /// <summary>
        /// 当前预警集合
        /// </summary>
        public List<EarlyWarning> list_EarlyWarning { get; set; }

        /// <summary>
        /// 联网矿测点定义发生改变
        /// </summary>
        /// <param name="nId">矿号</param>
        public void onDefinitionChanged( uint nId ) { }

        /// <summary>
        /// 联网矿数据改变
        /// </summary>
        /// <param name="nId">矿号</param>
        public void onDataChanged( uint nId ) { }

        /// <summary>
        /// 更新传感器信息
        /// </summary>
        /// <param name="nId"></param>
        public void UpdateSensors( uint nId ) { }

        /// <summary>
        /// 更新联网矿状态信息
        /// </summary>
        /// <param name="nId"></param>
        /// <param name="state"></param>
        public void UpdateCoalMineInfo( uint nId , ConnectStates state ) { }

        /// <summary>
        /// 更新实时数据
        /// </summary>
        public void UpdateDatas( uint nId )
        {
        }

        /// <summary>
        /// 更新测点定义
        /// </summary>
        public void UpdateDefinitions( uint nId )
        {
        }
    }
}